package org.quartz.simpl;

import org.quartz.spi.ClassLoadHelper;

import java.net.URL;
import java.io.InputStream;

public class ThreadContextClassLoadHelper implements ClassLoadHelper {

    public void initialize() {
    }

    public Class loadClass(String name) throws ClassNotFoundException {
        return getClassLoader().loadClass(name);
    }

    public URL getResource(String name) {
        return getClassLoader().getResource(name);
    }

    public InputStream getResourceAsStream(String name) {
        return getClassLoader().getResourceAsStream(name);
    }

    public ClassLoader getClassLoader() {
        return Thread.currentThread().getContextClassLoader();
    }
}
